import DataType from 'sequelize';
import { sequelize } from '../../sequelize';
const Wtp = sequelize.define('Wtp', {

  type: {
    type: new DataType.VIRTUAL(DataType.STRING),
    get() {
      return 'WtpType';
    },
  },

  id: {
    type: DataType.BIGINT,
    primaryKey: true,
    autoIncrement: true,
  },

  sn: {
    type: DataType.INTEGER,
  },

  name: {
    type: DataType.STRING,
  },

  mac: {
    type: DataType.STRING,
  },

  position: {
    type: DataType.STRING,
  },

  isMap: {
    type: DataType.BOOLEAN,
  },

  status: {
    type: DataType.INTEGER,
  },

  company_id: {
    type: DataType.INTEGER,
  },

  contract_id: {
    type: DataType.INTEGER,
  },

  profile_id: {
    type: DataType.INTEGER,
  }

});

export default Wtp;

